% solve for the bidder entry costs that set expected surplus from entering equal to zero
% Corresponds to equation 18 in the paper when zeroreserve = 1 and to
% equation 19 when zeroreserve = 0.
% ---------------------------------------------- %
function[eBo] = eBofunc(screeningvalue,v0star,lambdastar,pibmat,pib0vec,pdfmat,v0vec,zeroreserve,PAR)

   surplusfunc = @(eBo) (Pibidder(eBo,screeningvalue,v0star,lambdastar,pibmat,pib0vec,pdfmat,v0vec,zeroreserve,PAR)).^2;
   eBo          = fminbnd(surplusfunc,-200,200,optimset('TolFun',1e-3));
   
end